package com.reader.cms.mapper.sys;

import com.baomidou.mybatisplus.mapper.BaseMapper;

import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import java.util.List;
import java.util.Map;

import com.reader.cms.entity.sys.SysRole;
import org.apache.ibatis.annotations.Param;
/**
 * @@description     Mapper 接口
 * @author           gumenghao
 * @date             2018-09-25
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {
    List<Map<String, Object>>  selectListPage(Pagination page, @Param("name") String name);

    List<SysRole> selectAllRoles();

    List<SysRole> getRolesOfOrganization(@Param("code")String code);

    List<Integer> getRolesOfUserId(@Param("id")Integer id);

    void deletePermission(@Param("id") Integer id);

    void insertPermission(@Param("id") Integer id,@Param("menuIds")List<Integer> menuIds);


    Integer judeDel(@Param("id") Integer id);
}